package basics.day15.startsWith_endsWidthDemo;

public class Test {
    public static void main(String[] args) {
        startsWith();
        endsWith();
    }

    public static void endsWith() {
        String s = "Hello World";
        boolean b = s.endsWith("ld");
        System.out.println(b);
    }

    public static void startsWith() {
        /*
        startsWith 判断以什么字符串开头
         */
        String s = "Hello World";
        boolean b = s.startsWith("He");
        System.out.println(b);
    }
}
